.class public Les/td0;
.super Ljava/lang/Object;
.source "File.java"


# instance fields
.field a:Lcom/hierynomus/smbj/smb2/a;

.field b:Les/xd0;

.field c:Ljava/lang/String;

.field d:Ljava/util/EnumSet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/msdtyp/AccessMask;",
            ">;"
        }
    .end annotation
.end field

.field e:Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;


# direct methods
.method public constructor <init>(Lcom/hierynomus/smbj/smb2/a;Les/xd0;Ljava/lang/String;Ljava/util/EnumSet;Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/hierynomus/smbj/smb2/a;",
            "Les/xd0;",
            "Ljava/lang/String;",
            "Ljava/util/EnumSet<",
            "Lcom/hierynomus/msdtyp/AccessMask;",
            ">;",
            "Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;",
            ")V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Les/td0;->a:Lcom/hierynomus/smbj/smb2/a;

    .line 3
    iput-object p2, p0, Les/td0;->b:Les/xd0;

    .line 4
    iput-object p3, p0, Les/td0;->c:Ljava/lang/String;

    .line 5
    iput-object p4, p0, Les/td0;->d:Ljava/util/EnumSet;

    .line 6
    iput-object p5, p0, Les/td0;->e:Lcom/hierynomus/smbj/smb2/SMB2CreateDisposition;

    return-void
.end method


# virtual methods
.method public a(J[BII)I
    .locals 23
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/hierynomus/smbj/common/SMBApiException;
        }
    .end annotation

    move-object/from16 v0, p0

    .line 1
    iget-object v1, v0, Les/td0;->b:Les/xd0;

    invoke-virtual {v1}, Les/xd0;->a()Les/qd0;

    move-result-object v1

    .line 2
    invoke-virtual {v1}, Les/qd0;->a()Lcom/hierynomus/smbj/connection/a;

    move-result-object v2

    .line 3
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "position:"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-wide/from16 v14, p1

    invoke-virtual {v3, v14, v15}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const-string v4, "SMB2"

    invoke-static {v4, v3}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 4
    new-instance v3, Lcom/hierynomus/smbj/smb2/messages/l;

    invoke-virtual {v2}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v6

    invoke-virtual/range {p0 .. p0}, Les/td0;->b()Lcom/hierynomus/smbj/smb2/a;

    move-result-object v7

    .line 5
    invoke-virtual {v1}, Les/qd0;->b()J

    move-result-wide v8

    iget-object v4, v0, Les/td0;->b:Les/xd0;

    invoke-virtual {v4}, Les/xd0;->b()J

    move-result-wide v10

    move/from16 v4, p5

    int-to-long v12, v4

    move-object v5, v3

    move-wide/from16 v16, v12

    move-wide/from16 v12, p1

    move-wide/from16 v14, v16

    invoke-direct/range {v5 .. v15}, Lcom/hierynomus/smbj/smb2/messages/l;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;Lcom/hierynomus/smbj/smb2/a;JJJJ)V

    .line 6
    invoke-virtual {v2, v3}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v3

    .line 7
    sget-object v5, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v3, v5}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/hierynomus/smbj/smb2/messages/m;

    const/4 v5, 0x0

    move/from16 v6, p4

    move-object v8, v3

    move v7, v4

    const/4 v9, 0x0

    move-wide/from16 v3, p1

    .line 8
    :goto_0
    invoke-virtual {v8}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v10

    invoke-virtual {v10}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v10

    sget-object v11, Lcom/hierynomus/mserref/NtStatus;->STATUS_SUCCESS:Lcom/hierynomus/mserref/NtStatus;

    if-ne v10, v11, :cond_1

    .line 9
    invoke-virtual {v8}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v10

    invoke-virtual {v10}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v10

    sget-object v11, Lcom/hierynomus/mserref/NtStatus;->STATUS_END_OF_FILE:Lcom/hierynomus/mserref/NtStatus;

    if-eq v10, v11, :cond_1

    .line 10
    invoke-virtual {v8}, Lcom/hierynomus/smbj/smb2/messages/m;->c()[B

    move-result-object v9

    .line 11
    invoke-virtual {v8}, Lcom/hierynomus/smbj/smb2/messages/m;->d()I

    move-result v10

    move-object/from16 v11, p3

    .line 12
    invoke-static {v9, v5, v11, v6, v10}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    add-int/2addr v6, v10

    sub-int/2addr v7, v10

    if-gtz v7, :cond_0

    move v9, v10

    goto :goto_1

    :cond_0
    int-to-long v8, v10

    add-long/2addr v3, v8

    .line 13
    new-instance v8, Lcom/hierynomus/smbj/smb2/messages/l;

    invoke-virtual {v2}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v13

    invoke-virtual/range {p0 .. p0}, Les/td0;->b()Lcom/hierynomus/smbj/smb2/a;

    move-result-object v14

    .line 14
    invoke-virtual {v1}, Les/qd0;->b()J

    move-result-wide v15

    iget-object v9, v0, Les/td0;->b:Les/xd0;

    invoke-virtual {v9}, Les/xd0;->b()J

    move-result-wide v17

    move/from16 p1, v6

    int-to-long v5, v7

    move-object v12, v8

    move-wide/from16 v19, v3

    move-wide/from16 v21, v5

    invoke-direct/range {v12 .. v22}, Lcom/hierynomus/smbj/smb2/messages/l;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;Lcom/hierynomus/smbj/smb2/a;JJJJ)V

    .line 15
    invoke-virtual {v2, v8}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v5

    .line 16
    sget-object v6, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v5, v6}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v5

    move-object v8, v5

    check-cast v8, Lcom/hierynomus/smbj/smb2/messages/m;

    move/from16 v6, p1

    move v9, v10

    const/4 v5, 0x0

    goto :goto_0

    .line 17
    :cond_1
    :goto_1
    invoke-virtual {v8}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v1

    sget-object v2, Lcom/hierynomus/mserref/NtStatus;->STATUS_END_OF_FILE:Lcom/hierynomus/mserref/NtStatus;

    if-ne v1, v2, :cond_2

    const/4 v1, -0x1

    return v1

    :cond_2
    return v9
.end method

.method public a([BJIJ)J
    .locals 27
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/hierynomus/smbj/common/SMBApiException;
        }
    .end annotation

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move/from16 v2, p4

    const-wide/16 v3, 0x0

    if-gtz v2, :cond_0

    return-wide v3

    .line 18
    :cond_0
    iget-object v5, v0, Les/td0;->b:Les/xd0;

    invoke-virtual {v5}, Les/xd0;->a()Les/qd0;

    move-result-object v5

    .line 19
    invoke-virtual {v5}, Les/qd0;->a()Lcom/hierynomus/smbj/connection/a;

    move-result-object v6

    .line 20
    array-length v7, v1

    if-le v7, v2, :cond_1

    goto :goto_0

    :cond_1
    array-length v2, v1

    :goto_0
    int-to-long v7, v2

    long-to-int v2, v7

    .line 21
    new-array v2, v2, [B

    move-wide/from16 v23, v3

    move-wide v14, v7

    move-wide/from16 v7, p5

    :goto_1
    add-long v9, v23, p2

    long-to-int v10, v9

    const/4 v9, 0x0

    long-to-int v11, v14

    .line 22
    invoke-static {v1, v10, v2, v9, v11}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 23
    new-instance v12, Lcom/hierynomus/smbj/smb2/messages/s;

    invoke-virtual {v6}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v10

    invoke-virtual/range {p0 .. p0}, Les/td0;->b()Lcom/hierynomus/smbj/smb2/a;

    move-result-object v11

    .line 24
    invoke-virtual {v5}, Les/qd0;->b()J

    move-result-wide v16

    iget-object v9, v0, Les/td0;->b:Les/xd0;

    invoke-virtual {v9}, Les/xd0;->b()J

    move-result-wide v18

    const-wide/16 v21, 0x0

    move-object v9, v12

    move-object v3, v12

    move-wide/from16 v12, v16

    move-wide/from16 v25, v14

    move-wide/from16 v14, v18

    move-object/from16 v16, v2

    move-wide/from16 v17, v25

    move-wide/from16 v19, v7

    invoke-direct/range {v9 .. v22}, Lcom/hierynomus/smbj/smb2/messages/s;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;Lcom/hierynomus/smbj/smb2/a;JJ[BJJJ)V

    .line 25
    invoke-virtual {v6, v3}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v3

    .line 26
    sget-object v4, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v3, v4}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/hierynomus/smbj/smb2/messages/t;

    .line 27
    invoke-virtual {v3}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v4

    invoke-virtual {v4}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v4

    sget-object v9, Lcom/hierynomus/mserref/NtStatus;->STATUS_SUCCESS:Lcom/hierynomus/mserref/NtStatus;

    if-ne v4, v9, :cond_3

    .line 28
    invoke-virtual {v3}, Lcom/hierynomus/smbj/smb2/messages/t;->c()J

    move-result-wide v3

    add-long/2addr v7, v3

    add-long v23, v23, v3

    sub-long v14, v25, v3

    const-wide/16 v9, 0x0

    cmp-long v3, v14, v9

    if-nez v3, :cond_2

    return-wide v23

    :cond_2
    move-wide v3, v9

    goto :goto_1

    .line 29
    :cond_3
    new-instance v1, Lcom/hierynomus/smbj/common/SMBApiException;

    invoke-virtual {v3}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Write failed for "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v1, v2, v3}, Lcom/hierynomus/smbj/common/SMBApiException;-><init>(Lcom/hierynomus/mserref/NtStatus;Ljava/lang/String;)V

    goto :goto_3

    :goto_2
    throw v1

    :goto_3
    goto :goto_2
.end method

.method public a()V
    .locals 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/hierynomus/smbj/transport/TransportException;,
            Lcom/hierynomus/smbj/common/SMBApiException;
        }
    .end annotation

    .line 30
    iget-object v0, p0, Les/td0;->b:Les/xd0;

    invoke-virtual {v0}, Les/xd0;->a()Les/qd0;

    move-result-object v0

    invoke-virtual {v0}, Les/qd0;->a()Lcom/hierynomus/smbj/connection/a;

    move-result-object v0

    .line 31
    new-instance v8, Lcom/hierynomus/smbj/smb2/messages/a;

    .line 32
    invoke-virtual {v0}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v2

    iget-object v1, p0, Les/td0;->b:Les/xd0;

    .line 33
    invoke-virtual {v1}, Les/xd0;->a()Les/qd0;

    move-result-object v1

    invoke-virtual {v1}, Les/qd0;->b()J

    move-result-wide v3

    iget-object v1, p0, Les/td0;->b:Les/xd0;

    invoke-virtual {v1}, Les/xd0;->b()J

    move-result-wide v5

    iget-object v7, p0, Les/td0;->a:Lcom/hierynomus/smbj/smb2/a;

    move-object v1, v8

    invoke-direct/range {v1 .. v7}, Lcom/hierynomus/smbj/smb2/messages/a;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;JJLcom/hierynomus/smbj/smb2/a;)V

    .line 34
    invoke-virtual {v0, v8}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v0

    .line 35
    sget-object v1, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v0, v1}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hierynomus/smbj/smb2/messages/a;

    .line 36
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v1

    sget-object v2, Lcom/hierynomus/mserref/NtStatus;->STATUS_SUCCESS:Lcom/hierynomus/mserref/NtStatus;

    if-ne v1, v2, :cond_0

    return-void

    .line 37
    :cond_0
    new-instance v1, Lcom/hierynomus/smbj/common/SMBApiException;

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v0

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Close failed for "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, p0, Les/td0;->a:Lcom/hierynomus/smbj/smb2/a;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v0, v2}, Lcom/hierynomus/smbj/common/SMBApiException;-><init>(Lcom/hierynomus/mserref/NtStatus;Ljava/lang/String;)V

    throw v1
.end method

.method public b()Lcom/hierynomus/smbj/smb2/a;
    .locals 1

    .line 1
    iget-object v0, p0, Les/td0;->a:Lcom/hierynomus/smbj/smb2/a;

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "File{fileId="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Les/td0;->a:Lcom/hierynomus/smbj/smb2/a;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v1, ", fileName=\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Les/td0;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const/16 v1, 0x27

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    const/16 v1, 0x7d

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
